-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add list support to useFragment
, useSuspenseFragment
, and client.watchFragment
#12971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release-4.1
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: da3e9c2 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 11 changed, 0 removed
Build ID: 51d9a8212bec1603ddd871d8 URL: https://www.apollographql.com/docs/deploy-preview/51d9a8212bec1603ddd871d8 |
commit: |
}) as Observable<any>; | ||
|
||
return Object.assign(observable, { | ||
getCurrentResult: () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we return something with a changeTargets
property here? That way we wouldn't need to unwatch/rewatch 999 unrelated elements if one id changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! I was planning to do that next 🙂.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now implemented with reobserve
which will only watch
new ids and keep ids that haven't changed around 🙂
c427a20
to
d4072da
Compare
f542b84
to
1d0e27c
Compare
fffae5d
to
14aff28
Compare
5de32e7
to
82e1a21
Compare
Add support for lists with
useFragment
,useSuspenseFragment
, andclient.watchFragment
.